<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<div class="row">
    
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="chat-panel panel panel-default">
            <div class="panel-heading">
                <i class="fa fa-bullhorn fa-fw"></i>
                Tin tức

            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
                <ul class="chat">
                    <?php
                    foreach ($this->items as $item) {
                        if ($item->getEvent() == 1) {
                            ?>
                            <li class="left clearfix">
                                <span class="chat-img pull-left">
                                    <img src="<?php echo $this->ImageUrl() ?>/image/new_icon.gif" alt="User Avatar" class="img-circle">
                                </span>
                                <div class="chat-body clearfix">
                                    <div class="header">
                                        <strong class="primary-font"><?php echo $item->getTitle() ?></strong>
                                        <small class="pull-right text-muted">
                                            <i class="fa fa-clock-o fa-fw"></i> <?php echo GlobalLib::viewDate($item->getCreated()) ?>
                                        </small>
                                    </div>
                                    <p>
        <?php echo $item->getDescription() ?>
                                    </p>
                                </div>
                            </li>
    <?php } else { ?> 

                            <li class="right clearfix">
                                <span class="chat-img pull-right">
                                    <img src="<?php echo $this->ImageUrl() ?>/image/icon-hot.gif" alt="User Avatar" class="img-circle">
                                </span>
                                <div class="chat-body clearfix">
                                    <div class="header">
                                        <small class=" text-muted">
                                            <i class="fa fa-clock-o fa-fw"></i><?php echo GlobalLib::viewDate($item->getCreated()) ?></small>
                                        <strong class="pull-right primary-font"><?php echo $item->getTitle() ?></strong>
                                    </div>
                                    <p class="pull-right">
        <?php echo $item->getDescription() ?>
                                    </p>
                                </div>
                            </li> 
    <?php }
} ?>
                </ul>
            </div>
        </div>
    </div>
    <!-- /.panel-body -->

    <!-- /.panel-footer -->